//
//  GSMapManager.h
//  GasStation
//
//  Created by vedon on 2/1/16.
//  Copyright © 2016 vedon. All rights reserved.
//


#import <Foundation/Foundation.h>
#import <BaiduMapAPI_Map/BMKMapComponent.h>

typedef void (^GSMapManagerGeocodeCompletedBlock) (NSString *region ,NSError *error);


//地图管理器协议
@protocol GSMapManagerProtocol <NSObject>


//获得用户当前位置的回调
- (void)didGetUserCurrentLocation:(BMKUserLocation *)location;


//无法获取当前位置
- (void)didFailToGetUserLocation;

@end

@interface GSMapManager : NSObject

+ (instancetype)shareManager;

//添加观察者
- (void)addObserver:(id<GSMapManagerProtocol>)observer;


//移除观察者
- (void)removeObserver:(id<GSMapManagerProtocol>)observer;


//地图配置初始化
- (void)initialize;


//开始定位
- (void)startLocateMyLocation;


//停止定位
- (void)stopLocateMyLocation;

//用户当前位置
- (BMKUserLocation *)userLocation;

@end
